/PROG  FAUPNS0022
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "51930005";
PROG_SIZE	= 3276;
CREATE		= DATE 15-06-25  TIME 12:32:44;
MODIFIED	= DATE 15-06-25  TIME 12:32:44;
FILE_NAME	= PNS0022;
VERSION		= 0;
LINE_COUNT	= 115;
MEMORY_SIZE	= 3752;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0016 ;
   7:  !  PART:53122910  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:   ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  27:   ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED/SuDu] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  53:   ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED/SuDu] ;
  56:J P[3:PICK APPROACH] 100% CNT80 ACC130    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100    ;
  59:  PAYLOAD[2] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT70 ACC130 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,0.5sec    ;
  63:  DO[8:P4 PARTS OUT]=PULSE,0.5sec ;
  64:J P[7:PICK CLEAR] 100% CNT100 ACC120    ;
  65:  LBL[30:GOTO DROP POUNCE] ;
  66:J P[8:DROP POUNCE] 100% CNT100 ACC150 BREAK    ;
  67:  TIMER[3]=STOP ;
  68:  LBL[40:AT DROP POUNCE] ;
  69:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  70:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  71:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  72:  JMP LBL[40] ;
  73:   ;
  74:  LBL[50:MOVE DROP SNEAK] ;
  75:  TIMER[3]=START ;
  76:  OVERRIDE=R[5:SPEED/SuDu] ;
  77:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  78:  LBL[51:DROP OR C-P-S] ;
  79:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  80:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  81:  JMP LBL[51] ;
  82:  JMP LBL[50] ;
  83:   ;
  84:  LBL[60:MOVE CLS-PRS-ACC] ;
  85:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  86:  PAUSE ;
  87:  JMP LBL[30] ;
  88:   ;
  89:  LBL[80:DROP ENABLED] ;
  90:  TIMER[3]=START ;
  91:  !PROCEED TO DROP ;
  92:  OVERRIDE=R[5:SPEED/SuDu] ;
  93:J P[10:DROP APPROACH] 100% CNT80 ACC130    ;
  94:  MONITOR END Z_CHECH ;
  95:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
  96:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
  97:  PAYLOAD[1] ;
  98:  CALL CHK_DROP    ;
  99:   ;
 100:J P[12:DROP DEPART] 100% CNT100 ACC150    ;
 101:  DO[7:PRESS STAMPING START]=PULSE,0.5sec ;
 102:J P[13:DROP CLEAR] 100% CNT100 ACC150    ;
 103:  !GOTO PICK POUNCE ;
 104:J P[2:PICK POUNCE] 100% CNT100 ACC150    ;
 105:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 106:  JMP LBL[10] ;
 107:   ;
 108:  LBL[90:END OF CYCLE] ;
 109:  TIMER[1]=STOP ;
 110:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 111:  MONITOR END MON_PICK ;
 112:J P[1:MIDDLE] 50% CNT100    ;
 113:  MOVE TO HOME    ;
 114:   ;
 115:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2086.449  mm,	Y =      .195  mm,	Z = -1345.099  mm,
	W =  -180.000 deg,	P =      .000 deg,	R =   179.996 deg,
	E1=   107.704 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2148.507  mm,	Y =  1576.000  mm,	Z = -1092.883  mm,
	W =   179.618 deg,	P =      .901 deg,	R =   145.900 deg,
	E1=   139.042 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2643.044  mm,	Y =  3260.519  mm,	Z = -1040.000  mm,
	W =   179.766 deg,	P =     -.602 deg,	R =    90.956 deg,
	E1=   193.338 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2643.916  mm,	Y =  3265.546  mm,	Z = -1213.554  mm,
	W =   179.776 deg,	P =     -.171 deg,	R =    90.957 deg,
	E1=   193.337 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2643.044  mm,	Y =  3260.519  mm,	Z =  -980.000  mm,
	W =   179.766 deg,	P =     -.602 deg,	R =    90.956 deg,
	E1=   193.338 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2145.493  mm,	Y =  1510.836  mm,	Z =  -952.028  mm,
	W =   179.624 deg,	P =      .902 deg,	R =   146.197 deg,
	E1=   137.318 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2094.062  mm,	Y = -1076.844  mm,	Z =  -942.790  mm,
	W =  -178.281 deg,	P =      .405 deg,	R =  -156.514 deg,
	E1=    80.008 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2244.908  mm,	Y = -1964.687  mm,	Z =  -943.505  mm,
	W =  -178.039 deg,	P =     -.710 deg,	R =  -135.247 deg,
	E1=    58.843 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.766  mm,	Y = -3238.460  mm,	Z =  -950.000  mm,
	W =  -179.675 deg,	P =    -2.705 deg,	R =   -93.111 deg,
	E1=    16.960 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.767  mm,	Y = -3238.460  mm,	Z = -1177.887  mm,
	W =  -179.675 deg,	P =    -2.705 deg,	R =   -93.111 deg,
	E1=    16.960 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.767  mm,	Y = -3238.460  mm,	Z = -1070.000  mm,
	W =  -179.675 deg,	P =    -2.705 deg,	R =   -93.111 deg,
	E1=    16.960 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2101.127  mm,	Y = -1142.033  mm,	Z = -1108.745  mm,
	W =  -178.238 deg,	P =      .334 deg,	R =  -155.021 deg,
	E1=    79.438 deg
};
/END
